package com.wisezone.demo0218;

/**
 * 定义人员类
 */
@MyAnnotation(value = "yangye")
public class Person extends Creature<String> implements Comparable<String>,MyInterface{
    private String name;
    private  int age;

    public  Person(String name){

        this.name = name;
    }

    public int getAge() {

        return age;
    }

    public void setAge(int age) {

        this.age = age;
    }

    @Override
    public void out() {

        System.out.println("姓名："+this.name+"年龄："+this.age);
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
    @MyAnnotation(value = "show")
    public void show(){
        String str="SHOW:[Name:"+this.name+",Age"+this.age+"]";
        System.out.println(str);
    }
    @Override
    public int compareTo(String o) {

        return 0;
    }

    /**
     * 内部类
     */
    class Bird{

    }
}
